<?php
header("content-type:text/html;charset=utf8");
$news_name=$_GET['news_name'];
$news_content=$_GET['news_content'];
$dbh=new PDO('mysql:host=localhost;dbname=mhsw','root','root');
$sql="insert into news (news_name,news_content) VALUES('$news_name','$news_content')";
$dbhsql=$dbh->exec($sql);
if($dbhsql)
{
    header("locc xd d   ation:list.php");
}
else{
    echo "添加失败";
}